//
//  HBQHomeButton.m
//  HelloBeeQuick
//
//  Created by LiYiLin on 16/8/20.
//  Copyright © 2016年 LiYiLin. All rights reserved.
//

#import "HBQHomeButton.h"

#define KButtonW 40
#define KButtonWidth (KWIDTH / 4)

@implementation HBQHomeButton

- (instancetype)initWithFrame:(CGRect)frame {
    
    if (self == [super initWithFrame:frame]) {
        [self setup_Button];
    }
    return self;
}

#pragma mark - 配置界面
- (void)setup_Button {
    
    self.imageView.contentMode = UIViewContentModeScaleAspectFit;
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
    self.titleLabel.font = [UIFont systemFontOfSize:12];
    [self setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [self setTitleColor:KTHEMES forState:UIControlStateSelected];
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    self.imageView.frame = CGRectMake(0, 3, KButtonWidth, KButtonW);
    self.titleLabel.frame = CGRectMake(0, KButtonW + 9, KButtonWidth, self.bounds.size.height - KButtonW);
}


@end
